home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / GNU_KIT / DISK9.ZIP / include / ioctl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-22  |  3.6 KB  |  190 lines

  1. #ifndef    _IOCTL_H
  2. #define _IOCTL_H
  3.  
  4. #ifndef _COMPILER_H
  5. #include <compiler.h>
  6. #endif
  7.  
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11.  
  12. #define TIOCGETP    (('T'<< 8) | 0)
  13. #define TIOCSETP    (('T'<< 8) | 1)
  14. #define TIOCSETN    TIOCSETP
  15. #define TIOCGETC    (('T'<< 8) | 2)
  16. #define TIOCSETC    (('T'<< 8) | 3)
  17. #define TIOCGLTC    (('T'<< 8) | 4)
  18. #define TIOCSLTC    (('T'<< 8) | 5)
  19. #define TIOCGWINSZ    (('T'<< 8) | 11)
  20. #define TIOCSWINSZ    (('T'<< 8) | 12)
  21.  
  22. #ifdef __MINT__
  23. #define FSTAT        (('F'<< 8) | 0)
  24. #define FIONREAD    (('F'<< 8) | 1)
  25. #define FIONWRITE    (('F'<< 8) | 2)
  26. #define FUTIME        (('F'<< 8) | 3)
  27. #define FTRUNCATE    (('F'<< 8) | 4)
  28. #define TIOCGPGRP    (('T'<< 8) | 6)
  29. #define TIOCSPGRP    (('T'<< 8) | 7)
  30. #define TIOCFLUSH    (('T'<< 8) | 8)
  31. #define TIOCSTOP    (('T'<< 8) | 9)
  32. #define TIOCSTART    (('T'<< 8) | 10)
  33. #define TIOCGXKEY    (('T'<< 8) | 13)
  34. #define TIOCSXKEY    (('T'<< 8) | 14)
  35.  
  36. #define TIOCIBAUD    (('T'<< 8) | 18)
  37. #define TIOCOBAUD    (('T'<< 8) | 19)
  38. #define TIOCCBRK    (('T'<< 8) | 20)
  39. #define TIOCSBRK    (('T'<< 8) | 21)
  40. #define TIOCGFLAGS    (('T'<< 8) | 22)
  41. #define TIOCSFLAGS    (('T'<< 8) | 23)
  42. #define TIOCOUTQ    (('T'<< 8) | 24)
  43.  
  44. /* faked by the library */
  45. #define TIOCNOTTY    (('T'<<8) | 251)
  46.  
  47. /* not yet implemented in MiNT */
  48. #define TIOCGETD    (('T'<<8) | 252)
  49. #define TIOCSETD    (('T'<<8) | 253)
  50. #define TIOCLGET    (('T'<<8) | 254)
  51. #define TIOCLSET    (('T'<<8) | 255)
  52.  
  53. #define NTTYDISC    1
  54.  
  55. /* ioctl's to act on processes */
  56. #define PPROCADDR    (('P'<<8) | 1)
  57. #define PBASEADDR    (('P'<<8) | 2)
  58. #define PCTXTSIZE    (('P'<< 8) | 3)
  59. #define PSETFLAGS    (('P'<< 8) | 4)
  60. #define PGETFLAGS    (('P'<< 8) | 5)
  61.  
  62. /* shared memory ioctl's */
  63. #define SHMGETBLK    (('M'<< 8) | 0)
  64. #define SHMSETBLK    (('M'<< 8) | 1)
  65.  
  66. #endif /* __MINT__ */
  67.  
  68. #ifndef _filesys_h
  69. struct tchars {
  70.     char    t_intrc;
  71.     char    t_quitc;
  72.     char    t_startc;
  73.     char    t_stopc;
  74.     char    t_eofc;
  75.     char    t_brkc;
  76. };
  77.  
  78. struct ltchars {
  79.     char    t_suspc;
  80.     char    t_dsuspc;
  81.     char    t_rprntc;
  82.     char    t_flushc;
  83.     char    t_werasc;
  84.     char    t_lnextc;
  85. };
  86.  
  87. #define    CRMOD        0x0001
  88. #define    CBREAK        0x0002
  89. #ifndef _TERMIOS_H
  90. #define ECHO        0x0004
  91. #endif /* _TERMIOS_H */
  92. #define    XTABS        0x0008
  93. #define    RAW        0x0010
  94. #define LCASE        0x0020        /* does nothing */
  95. #ifndef _TERMIOS_H
  96. #define NOFLSH        0x0040
  97. #ifdef __MINT__
  98. #define TOSTOP        0x0100
  99. #endif /* __MINT__ */
  100. #endif /* _TERMIOS_H */
  101. #define TANDEM        0x1000
  102. #define _RTSCTS        0x2000
  103. #define EVENP        0x4000
  104. #define ODDP        0x8000
  105. #define ANYP        (0)
  106. #endif /* _filesys_h */
  107.  
  108. #ifndef _TERMIOS_H
  109. #define B0        0
  110. #define B50        1
  111. #define B75        2
  112. #define B110        3
  113. #define B134        4
  114. #define B135        4
  115. #define B150        5
  116. #define B200        6
  117. #define B300        7
  118. #define B600        8
  119. #define B1200        9
  120. #define B1800        10
  121. #define B2400        11
  122. #define B4800        12
  123. #define B9600        13
  124. #define B19200        14
  125. #define B38400        15
  126. #endif
  127.  
  128. /* The ones below aren't supported by the kernel, at least not yet */
  129. #define VTDELAY        0
  130. #define ALLDELAY    0
  131.  
  132. #ifdef __MINT__
  133.  
  134. #define XKEY        0x0200
  135.  
  136. #ifndef _filesys_h
  137. struct xkey {
  138.     short    xk_num;
  139.     char    xk_def[8];
  140. };
  141. #endif
  142.  
  143. /* some fake defines for the line discipline stuff */
  144.  
  145. #define LCRTBS        0x01
  146. #define LCRTERA        0x02
  147. #define LCRTKIL        0x04
  148. #define LPRTERA        0x10
  149. #define LFLUSHO        0x20
  150. #define LLITOUT        0x100
  151.  
  152. #else
  153.  
  154. #define META        0x0100        /* extension: Alternate as meta key */
  155. #define PASS8        0x0100
  156.  
  157. #endif /* __MINT__ */
  158.  
  159. #ifndef _filesys_h
  160. struct sgttyb {
  161.     char    sg_ispeed;
  162.     char    sg_ospeed;
  163.     char    sg_erase;
  164.     char    sg_kill;
  165.     short    sg_flags;
  166. };
  167.  
  168. struct winsize {
  169.     short    ws_row;
  170.     short    ws_col;
  171.     short    ws_xpixel;
  172.     short    ws_ypixel;
  173. };
  174. #endif
  175.  
  176. struct _mutimbuf {
  177.     unsigned short actime, acdate;    /* GEMDOS format */
  178.     unsigned short modtime, moddate;
  179. };
  180.  
  181. __EXTERN int ioctl    __PROTO((int, int, void *));
  182. __EXTERN int stty    __PROTO((int, struct sgttyb *));
  183. __EXTERN int gtty    __PROTO((int, struct sgttyb *));
  184.  
  185. #ifdef __cplusplus
  186. }
  187. #endif
  188.  
  189. #endif    /* _IOCTL_H */
  190.